<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html>

<html xmlns:c="http://java.sun.com/jsp/jstl/core">
<head>
	<!-- CSS-Dateien verknÃ¼pfen -->
    <link type="text/css" rel="stylesheet" href="<c:url value="/resources/style/datenaendern.css"/>" />
	<title>Daten ändern</title>
</head>

<body>
	<!-- Header mit Menüleiste -->
	<%@ include file="../header.jsp" %>
	
	
	<form method="post" action="/datenaendern" name="datenaendern" class="datenaendern">
	    <h3>Userdaten</h3>
	    <div>
	        <label>Vorname:</label>
	        <input type="text" name="vorname" value="${userBean.vorname}"/>
	        <p class="error smallError" id="vornameError"></p>
	    </div>
	    <div>
	        <label>Nachname:</label>
	        <input type="text" name="nachname" value="${userBean.nachname}"/>
	        <p class="error smallError" id="nachnameError"></p>
	    </div>
	    <div>
	        <label>E-Mail:</label>
	        <input type="text" name="email" value="${userBean.email}"/>
	        <p class="error smallError" id="emailError"></p>
	    </div>
	    <h3>Login-Daten</h3>
	    <div>
	        <label>Username:</label>
	        <input type="text" name="username" value="${userBean.username}"/>
	        <p class="error smallError" id="usernameError"></p>
	    </div>
	    <div>
	        <label>Passwort:</label>
	        <input type="password" name="passwort" id="passwort" value="${userBean.passwort}"/>
	        <p class="error smallError" id="passwortError"></p>
	    </div>
	    <div>
	        <label>Passwort wiederholen:</label>
	        <input type="password" name="passwort_wdh"/>
	        <p class="error smallError" id="passwort_wdhError"></p>
	    </div>
	    <p class="error" id="generalError"></p>
	    <input type="submit" value="Ändern" />
	    <div class="clear"></div>
	    
	    <input type="hidden" name="vorname_alt" value="${userBean.vorname}"/>
	    <input type="hidden" name="nachname_alt" value="${userBean.nachname}"/>
	    <input type="hidden" name="email_alt" value="${userBean.email}"/>
	    <input type="hidden" name="username_alt" value="${userBean.username}"/>
	    <input type="hidden" name="passwort_alt" value="${userBean.passwort}"/>
	    <input type="hidden" id="contextPath" value="<%request.getContextPath();%>"/>
    </form>
	
	<!-- Footer -->
	<%@ include file="../footer.jsp" %>
	
	<!--  JQuery & JavaScript Scripte einbinden -->
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
    <script type="text/javascript" src="<c:url value="/resources/script/standard.js"/> "></script>
    <script type="text/javascript" src="<c:url value="/resources/script/datenaendern.js"/> "></script>
</body>
</html>